package com.glomozda.machinerepairdao.domain.machine;

@SuppressWarnings({"PMD.CommentRequired", "PMD.LawOfDemeter"})
public class Machine {
	private Integer machineID;
	private String  machineName;
	private String  machineCountry;
	private String  machineTrademark;
	private Integer machineYear;
	private Integer machineTimesRepaired;

	public Machine(){
	}

	public Machine(final String machineName, final String machineCountry, final String machineTrademark,
			final Integer machineYear, final Integer machineTimesRepaired) {
		this.machineName = machineName;
		this.machineCountry = machineCountry;
		this.machineTrademark = machineTrademark;
		this.machineYear = machineYear;
		this.machineTimesRepaired = machineTimesRepaired;
	}    

	public String getMachineName() {
		return machineName;
	}

	public void setMachineName(final String machineName) {
		this.machineName = machineName;
	}

	public Integer getMachineYear() {
		return machineYear;
	}

	public void setMachineYear(final Integer machineYear) {
		this.machineYear = machineYear;
	}

	public Integer getMachineID() {
		return machineID;
	}

	public void setMachineID(final Integer machineID) {
		this.machineID = machineID;
	}

	public String getMachineCountry() {
		return machineCountry;
	}

	public void setMachineCountry(final String machineCountry) {
		this.machineCountry = machineCountry;
	}

	public String getMachineTrademark() {
		return machineTrademark;
	}

	public void setMachineTrademark(final String machineTrademark) {
		this.machineTrademark = machineTrademark;
	}

	public Integer getMachineTimesRepaired() {
		return machineTimesRepaired;
	}

	public void setMachineTimesRepaired(final Integer machineTimesRepaired) {
		this.machineTimesRepaired = machineTimesRepaired;
	}

	@Override
	public int hashCode() {
		int hash = 3;
		hash = 13 * hash + (this.machineName != null ? this.machineName.hashCode() : 0);
		hash = 13 * hash + (this.machineYear != null ? this.machineYear.hashCode() : 0);
		return hash;
	}

	@Override
	public boolean equals(final Object obj) {
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		final Machine other = (Machine) obj;
		if ((this.machineName == null) ? other.machineName != null : !this.machineName.equals(other.machineName)) {
			return false;
		}
		if (this.machineCountry != other.machineCountry && (this.machineCountry == null || !this.machineCountry.equals(other.machineCountry))) {
			return false;
		}
		if (this.machineTrademark != other.machineTrademark && (this.machineTrademark == null || !this.machineTrademark.equals(other.machineTrademark))) {
			return false;
		}
		if (this.machineYear != other.machineYear && (this.machineYear == null || !this.machineYear.equals(other.machineYear))) {
			return false;
		}
		return true;
	}    

	@Override
	public String toString() {
		return "machine{" + "machineID=" + machineID + ", machineName=" + machineName + ", machineCountry=" + machineCountry + ", machineTrademark=" + machineTrademark + ", machineYear=" + machineYear + '}'+"\n";
	}
	    
}
